package com.fs.sw.common.exception;

import com.fs.sw.common.exception.enums.ResultEnum;

public class CPException extends RuntimeException {

	/**
	 * 
	 */
	private static final long serialVersionUID = 5415403228223842281L;
	
	private Integer code;

    public CPException(Integer code, String message) {
        super(message);
        this.code = code;
    }

    public CPException(ResultEnum resultEnum) {
        super(resultEnum.getMessage());
        this.code = resultEnum.getCode();
    }

	public Integer getCode() {
		return code;
	}

}
